home *** CD-ROM | disk | FTP | other *** search
- /*******************************************\
- * file: PrintTitle.c *
- * version: 0.1ß *
- * XFCN ID 505 *
- * *
- * Sets style information about the text *
- * Providing no parameters will reset the *
- * style. *
- * *
- * ----------------------------------------- *
- * By: Donald Koscheka *
- * Date: 30-OCT-89 *
- * © Copyright 1989, Donald Koscheka *
- * All Rights Reserved *
- * *
- * ----------------------------------------- *
- \*******************************************/
-
- #include <MacTypes.h>
- #include <MemoryMgr.h>
- #include <ResourceMgr.h>
- #include <OSUtil.h>
- #include <HyperXCmd.h>
- #include <HyperUtils.h>
- #include <PrintMgr.h>
- #include "ReportUtils.h"
-
-
- pascal void main( paramPtr )
- XCmdBlockPtr paramPtr;
- /**********************************
- * params[0] == the font
- * params[1] == the size
- * params[2] == the style
- * params[3] == the justification
- *
- * SHOULD BE ABLE TO RESET THE DEFAULT
- * UNDER PROGRAM CONTROL!!! (REQUIRES
- * ADDING FIELDS TO pInfo).
- **********************************/
- {
- Handle pH;
- pInfoPtr pp;
- short theFont = DEFAULT_FONT;
- short theSize = DEFAULT_SIZE;
- short theStyle= PLAIN_TEXT;
- short theJust = teJustLeft;
- long siz;
- char *fp1;
- char *fp2;
- char fontName[256];
- stylePtr sp;
-
- if( pH = GetSystemResource( PAGE_INFO, PAGE_ID ) ){
- pp = (pInfoPtr)*pH;
-
- if( paramPtr->params[0] ){
- paramtoPString( paramPtr, 0, (char *)fontName );
- GetFNum( fontName, &theFont );
- }
-
- if( paramPtr->params[1] )
- theSize = parseNum( *(paramPtr->params[1] ) );
-
- if( paramPtr->params[2] )
- theStyle = (short)matchToken( paramPtr->params[2], TEXT_STYLES );
-
- if( paramPtr->params[3] )
- theJust = (short)matchToken( paramPtr->params[3], TEXT_JUSTIFICATION );
-
- sp = (stylePtr)&(pp->curntStyle);
- SetFont( sp, theFont );
- SetFontSize( sp, theSize );
- SetFontStyle( sp, theStyle );
- SetFontJust( sp, theJust );
- }
-
- paramPtr->returnValue = NIL;
- }
-
-
-